home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Lengths
/
Modify
/
l-condense-range
< prev
next >
Wrap
Lisp/Scheme
|
1998-08-11
|
606b
|
22 lines
l-condense-range range pattern
0-based
Use this function as an extension of length-condense when you wish to condense a range of note-length values with a note-length list.
(setq len1 (qlength '20-11011))
(setq len2 (qlength '((20-11011) (24-1131) (16-13) (20-14))))
(l-condense-range '(3 5) len1)
=> (1/20 1/20 -1/20 1/10)
(setq range
(pick-rnd1 .21 :content 2
(g-integer 0 (l-count :all :content len2))))
=> ((5 1) (1 2) (0 2) (1 0))
internally to: ((1 5) (1 2) (0 2) (0 1))
(l-condense-range range len2)
=> ((1/20 1/20 -1/20 1/10) (1/24 1/24 1/8 1/24) (1/4) (1/20 1/5))